package cz.najman.emdroid.utils;

import java.util.HashMap;
import java.util.Map;

public class XmlToDatabaseMapper implements DataMapper {
	private Map<String, Integer> mMappings;
	
	public XmlToDatabaseMapper() {
		mMappings = new HashMap<String, Integer>();
	}	
	
	@Override
	public int getCorrespondingIndex(String key) {		
		
		if (mMappings.containsKey(key))
			return mMappings.get(key);
		else
			return -1;
	}

	@Override
	public void putMapping(String key, int value) {		
		mMappings.put(key, value);
	}


	@Override
	public void removeMapping(String key) {
		mMappings.remove(key);		
	}	

}
